let fs=require('fs')
let Mock=require('mockjs')

let data=Mock.mock({
    "data|5":[{
        img:"@image(45x45,@color)",
        name:"@cword(2,4)",
        pice:/\d{1,4}/,
        count:/\d{1,3}/
    }]
})
// 写入json文件中
fs.writeFileSync('./data.json',JSON.stringify(data.data))